<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<meta charset="utf-8">
<head th:include="include :: header"></head>
<style>
    .product-table {
        width: 100%;
    }
    .product-table th,td{
        text-align: center !important;
        font-size: 12px !important;
    }

    .product-table th{
        padding: 5px 10px !important;

    }

</style>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="fixed-table-toolbar">
                    <div class="columns pull-left">
                        <button shiro:hasPermission="invoice:add" type="button" class="btn  btn-primary"
                                onclick="add()">
                            <i class="fa fa-plus" aria-hidden="true"></i>添加
                        </button>
                        <button shiro:hasPermission="invoice:remove" type="button" class="btn  btn-danger"
                                onclick="batchRemove()">
                            <i class="fa fa-trash" aria-hidden="true"></i>删除
                        </button>
                        <a  type="button" class="btn  btn-primary"
                            th:href="${#httpServletRequest.getContextPath()}+'/invoice/exportInvoice'">
                            <i class="fa fa-download" aria-hidden="true"></i>模板
                        </a>

                        <button  type="button" class="btn  btn-danger"
                                 onclick="invoiceImport()">
                            <i class="fa fa-upload" aria-hidden="true"></i>导入
                        </button>
                    </div>
                    <div class="columns pull-right">
                        <button class="btn btn-success" onclick="reLoad()">查询</button>
                    </div>
                    <div class="columns pull-right col-md-2 nopadding">
                        <input id="searchKey" type="text" class="form-control"
                               placeholder="经销商">
                    </div>
                </div>
                <table id="exampleTable" data-mobile-responsive="true">
                </table>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    var s_edit_h = 'hidden';
    var s_remove_h = 'hidden';
</script>
<script type="text/javascript" shiro:hasPermission="invoice:edit">
    s_edit_h = '';
</script>
<div shiro:hasPermission="invoice:remove">
    <script type="text/javascript">
        var s_remove_h = '';
    </script>
</div>

<div th:include="include :: footer"></div>
<script type="text/javascript" th:src="@{/js/appjs/invoice/invoice.js}"
        src="/static/js/appjs/invoice/invoice.js"></script>
</body>
</html>